home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / cvs-1.8 / cvs-1 / cvs-1.8.1 / src / rcs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-06  |  3.3 KB  |  105 lines

  1. /* $CVSid: @(#)rcs.h 1.18 94/09/23 $     */
  2.  
  3. /*
  4.  * Copyright (c) 1992, Brian Berliner and Jeff Polk
  5.  * Copyright (c) 1989-1992, Brian Berliner
  6.  * 
  7.  * You may distribute under the terms of the GNU General Public License as
  8.  * specified in the README file that comes with the CVS 1.4 kit.
  9.  * 
  10.  * RCS source control definitions needed by rcs.c and friends
  11.  */
  12.  
  13. #define    RCS        "rcs"
  14. #define    RCS_CI        "ci"
  15. #define    RCS_CO        "co"
  16. #define    RCS_RLOG    "rlog"
  17. #define    RCS_DIFF    "rcsdiff"
  18. #define    RCS_RCSMERGE    "rcsmerge"
  19. #define    RCS_MERGE_PAT    "^>>>>>>> "    /* runs "grep" with this pattern */
  20. #define    RCSEXT        ",v"
  21. #define RCSPAT        "*,v"
  22. #define    RCSHEAD        "head"
  23. #define    RCSBRANCH    "branch"
  24. #define    RCSSYMBOLS    "symbols"
  25. #define    RCSDATE        "date"
  26. #define    RCSDESC        "desc"
  27. #define RCSEXPAND    "expand"
  28.  
  29. /* Used by the version of death support which resulted from old
  30.    versions of CVS (e.g. 1.5 if you define DEATH_SUPPORT and not
  31.    DEATH_STATE).  Only a hacked up RCS (used by those old versions of
  32.    CVS) will put this into RCS files.  Considered obsolete.  */
  33. #define RCSDEAD        "dead"
  34.  
  35. #define    DATEFORM    "%02d.%02d.%02d.%02d.%02d.%02d"
  36. #define    SDATEFORM    "%d.%d.%d.%d.%d.%d"
  37.  
  38. /*
  39.  * Opaque structure definitions used by RCS specific lookup routines
  40.  */
  41. #define VALID    0x1            /* flags field contains valid data */
  42. #define    INATTIC    0x2            /* RCS file is located in the Attic */
  43. #define PARTIAL 0x4            /* RCS file not completly parsed */
  44.  
  45. struct rcsnode
  46. {
  47.     int refcount;
  48.     int flags;
  49.     char *path;
  50.     char *head;
  51.     char *branch;
  52.     char *symbols_data;
  53.     char *expand;
  54.     List *symbols;
  55.     List *versions;
  56. };
  57.  
  58. typedef struct rcsnode RCSNode;
  59.  
  60. struct rcsversnode
  61. {
  62.     char *version;
  63.     char *date;
  64.     char *author;
  65.     char *next;
  66.     int dead;
  67.     List *branches;
  68. };
  69. typedef struct rcsversnode RCSVers;
  70.  
  71. /*
  72.  * CVS reserves all even-numbered branches for its own use.  "magic" branches
  73.  * (see rcs.c) are contained as virtual revision numbers (within symbolic
  74.  * tags only) off the RCS_MAGIC_BRANCH, which is 0.  CVS also reserves the
  75.  * ".1" branch for vendor revisions.  So, if you do your own branching, you
  76.  * should limit your use to odd branch numbers starting at 3.
  77.  */
  78. #define    RCS_MAGIC_BRANCH    0
  79.  
  80. /*
  81.  * exported interfaces
  82.  */
  83. RCSNode *RCS_parse PROTO((const char *file, const char *repos));
  84. RCSNode *RCS_parsercsfile PROTO((char *rcsfile));
  85. char *RCS_check_kflag PROTO((const char *arg));
  86. char *RCS_getdate PROTO((RCSNode * rcs, char *date, int force_tag_match));
  87. char *RCS_gettag PROTO((RCSNode * rcs, char *symtag, int force_tag_match,
  88.             int return_both));
  89. char *RCS_getversion PROTO((RCSNode * rcs, char *tag, char *date,
  90.               int force_tag_match, int return_both));
  91. char *RCS_magicrev PROTO((RCSNode *rcs, char *rev));
  92. int RCS_isbranch PROTO((RCSNode *rcs, const char *rev));
  93. int RCS_nodeisbranch PROTO((RCSNode *rcs, const char *tag));
  94. char *RCS_whatbranch PROTO((RCSNode *rcs, const char *tag));
  95. char *RCS_head PROTO((RCSNode * rcs));
  96. int RCS_datecmp PROTO((char *date1, char *date2));
  97. time_t RCS_getrevtime PROTO((RCSNode * rcs, char *rev, char *date, int fudge));
  98. List *RCS_symbols PROTO((RCSNode *rcs));
  99. void RCS_check_tag PROTO((const char *tag));
  100. void freercsnode PROTO((RCSNode ** rnodep));
  101. char *RCS_getbranch PROTO((RCSNode * rcs, char *tag, int force_tag_match));
  102.  
  103. int RCS_isdead PROTO((RCSNode *, const char *));
  104. char *RCS_getexpand PROTO ((RCSNode *));
  105.